package org.graduation.model.common.RBAC;

public enum Roles {
    CREATOR(0),
    ADMIN(1),
    TEAM_MEMBER(2),
    NOTE_CREATOR(14);
    private int roleId;

    Roles(int roleId) {
        this.roleId = roleId;
    }

    public static Roles valueOf(int roleId) {
        for (Roles roles : values()) {
            if (roleId == roles.getRoleId()) {
                return roles;
            }
        }
        return TEAM_MEMBER;
    }

    public int getRoleId() {
        return roleId;
    }
}
